<?php
class User extends AppModel {

    var $displayField = 'email_address';
    var $name = 'User';
    //var $validate = array(
//        'email_address' => array('email'),
//        'password' => array('alphaNumeric'),
//        'active' => array('numeric')
//    );
    var $hasAndBelongsToMany = array(
            'Group' => array('className' => 'Group',
                        'joinTable' => 'groups_users',
                        'foreignKey' => 'user_id',
                        'associationForeignKey' => 'group_id',
                        'unique' => true
            ), 
            'Job' => array('className' => 'Job',
                        'joinTable' => 'jobs_users',
                        'foreignKey' => 'user_id',
                        'associationForeignKey' => 'job_id',
                        'unique' => true
            ),
            'Skill' => array('className' => 'Skill',
                        'joinTable' => 'skills_users',
                        'foreignKey' => 'user_id',
                        'associationForeignKey' => 'skill_id',
                        'unique' => true
            ), 
            'Available' => array('className' => 'Available',
                        'joinTable' => 'availables_users',
                        'foreignKey' => 'user_id',
                        'associationForeignKey' => 'available_id',
                        'unique' => true
            )
    );
}
?>
